package com.lmq.observerMode.impro;

public class obserm {
    public static void main(String[] args) {

        WeatherData weatherData = new WeatherData();
        CurrentConditions currentConditions = new CurrentConditions();
        BaiduSite baiduSite = new BaiduSite();

        weatherData.registerObserver(currentConditions);
        weatherData.registerObserver(baiduSite);
        System.out.println("通知观察者，看看信息");
        weatherData.setData(10,100,30.0f);

        weatherData.removeObserver(currentConditions);

        System.out.println("通知观察者，看看信息");
        weatherData.setData(120,1100,30.0f);




    }
}



